
import { FormSchema } from '/@/components/Table';


import { JVxeTypes, JVxeColumn } from '../../../../components/base/JVxeTable/types';




//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '创建人',
    field: 'creator',
    filedkey: 'demonstration_creator',
    component: 'JSelectUser',
    componentProps: {},
    dynamicRules: ({ model, schema }) => {
      return [{ required: true, message: '请输入创建人!' }];
    },
  },
  {
    label: '流程状态',
    field: 'processStatus',
    filedkey: 'demonstration_process_status',
    component: 'Input',
  },
  {
    label: '项目名称',
    field: 'projectName',
    filedkey: 'demonstration_project_name',
    component: 'Input',
  },
  {
    label: '实施阶段',
    field: 'implementStage',
    filedkey: 'demonstration_implement_stage',
    component: 'Input',
  },
  {
    label: '项目类型',
    field: 'projectType',
    filedkey: 'demonstration_project_type',
    component: 'Input',
  },
  {
    label: '现场活动类型',
    field: 'activityType',
    filedkey: 'demonstration_activity_type',
    component: 'Input',
  },
  {
    label: '项目实施单位',
    field: 'implementDepartment',
    filedkey: 'demonstration_implement_department',
    component: 'JSelectDept',
    componentProps: {},
  },
  {
    label: '工程地点',
    field: 'projectLocation',
    filedkey: 'demonstration_project_location',
    component: 'Input',
  },
  {
    label: '项目经理',
    field: 'projectManager',
    filedkey: 'demonstration_project_manager',
    component: 'JSelectUser',
    componentProps: {},
  },
  {
    label: '巡视牵头部门',
    field: 'leadDepartment',
    filedkey: 'demonstration_lead_department',
    component: 'JSelectDept',
    componentProps: {},
  },
  {
    label: '巡视组长',
    field: 'inspectionLeader',
    filedkey: 'demonstration_inspection_leader',
    component: 'JSelectUser',
    componentProps: {},
  },
  {
    label: '巡视成员',
    field: 'inspectionMembers',
    filedkey: 'demonstration_inspection_members',
    component: 'JSelectUser',
    componentProps: {},
  },
  {
    label: '附件',
    field: 'attachment',
    filedkey: 'demonstration_attachment',
    component: 'Input',
  },
  {
    label: '说明事项',
    field: 'description',
    filedkey: 'demonstration_description',
    component: 'InputTextArea',
  },
  {
    label: '计划巡视开始时间',
    field: 'planStartTime',
    filedkey: 'demonstration_plan_start_time',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
  },
  {
    label: '计划巡视结束时间',
    field: 'planEndTime',
    filedkey: 'demonstration_plan_end_time',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
  },
  {
    label: '策划编号',
    field: 'planCode',
    filedkey: 'demonstration_plan_code',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'contactNumber',
    filedkey: 'demonstration_contact_number',
    component: 'InputNumber',
  },
  {
    label: '策划部门',
    field: 'createDepartment',
    filedkey: 'demonstration_create_department',
    component: 'JSelectDept',
    componentProps: {},
  },
  {
    label: '新任务通知方式',
    field: 'notificationMethod',
    filedkey: 'demonstration_notification_method',
    component: 'Input',
  },
  {
    label: '二级单位领导',
    field: 'subUnitLeader',
    filedkey: 'demonstration_sub_unit_leader',
    component: 'JSelectUser',
    componentProps: {},
  },
  {
    label: '流程key',
    field: 'processKey',
    filedkey: 'demonstration_process_key',
    component: 'Input',
  },
  {
    label: '流程定位',
    field: 'processLocation',
    filedkey: 'demonstration_process_location',
    component: 'Input',
  },
  {
    label: '流程实例id',
    field: 'processInstanceId',
    filedkey: 'demonstration_process_instance_id',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
//子表单数据
//子表表格配置
export const DetailColumnsone: JVxeColumn[] = [
  {
    title: '创建人',
    key: 'creator',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_creator',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
  {
    title: '流程状态',
    key: 'processStatus',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_process_status',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
  {
    title: '巡视内容',
    key: 'inspectionContent',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_inspection_content',
    type: JVxeTypes.textarea,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '专业名称',
    key: 'majorName',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_major_name',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '专业负责人',
    key: 'majorLeader',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_major_leader',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视开始日期',
    key: 'inspectionStartDate',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_inspection_start_date',
    type: JVxeTypes.datetime,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视结束日期',
    key: 'inspectionEndDate',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_inspection_end_date',
    type: JVxeTypes.datetime,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '状态',
    key: 'status',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_status',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视策划主表',
    key: 'inspectionPlanMainId',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_one_inspection_plan_main_id',
    type: JVxeTypes.inputNumber,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
];
export const DetailColumnstwo: JVxeColumn[] = [
  {
    title: '创建人',
    key: 'creator',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_creator',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
  {
    title: '流程状态',
    key: 'processStatus',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_process_status',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
  {
    title: '巡视内容',
    key: 'inspectionContent',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_inspection_content',
    type: JVxeTypes.textarea,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '专业名称',
    key: 'majorName',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_major_name',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '专业负责人',
    key: 'majorLeader',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_major_leader',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视开始日期',
    key: 'inspectionStartDate',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_inspection_start_date',
    type: JVxeTypes.datetime,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视结束日期',
    key: 'inspectionEndDate',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_inspection_end_date',
    type: JVxeTypes.datetime,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '状态',
    key: 'status',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_status',
    type: JVxeTypes.input,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
    validateRules: [{ required: true, message: '${title}不能为空' }],
  },
  {
    title: '巡视策划主表',
    key: 'inspectionPlanMainId',
    // 新增 filedkey 属性
    filedkey: 'DetailColumns_two_inspection_plan_main_id',
    type: JVxeTypes.inputNumber,
    width: '200px',
    placeholder: '请输入${title}',
    defaultValue: '',
  },
];

